<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet"/>
<script src="assets/js/select2/select2.js"></script>
<div class="row ">
    <!-- 映射列表 -->
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="leftTree">
        <div class="row" style="margin-bottom: 15px;margin-top:15px;font-size: 14px">
                    <span style="padding-left: 16px">
                        请选择报班所要延期的课时包
                    </span>
        </div>
        <div class="widget flat radius-bordered">
            <div class="widget-body no-padding">
                <div class="table-scrollable">
                    <!-- 数据表列信息列表 -->
                    <table class="table table-bordered dataTable">
                        <thead>
                        <tr>
                            <th title="会员课时包id">课时包名称</th>
                            <th title="剩余课时">已出勤天数</th>
                            <th title="剩余有效期">剩余有效期</th>
                            <th title="延期次数">延期次数</th>
                            <th title="延期备注">延期备注</th>
                            <th class="fixedColumn">操作项</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#if mapList?size==0>
                            <tr>
                                <td align="center">无数据</td>
                            </tr>
                        </#if>
                        <#list mapList as data>
                            <tr>
                                <td>${(data.name???string(data.name?html,"未设置"))!'未设置'}</td>
                                <td>${(data.attendedDay???string(data.attendedDay?html,"未设置"))!'未设置'}</td>
                                <td>${(data.surplusValidDate???string(data.surplusValidDate?html,"未设置"))!'未设置'}</td>
                                <td>${(data.postponeCount???string(data.postponeCount?html,"0"))!'0'}</td>
                                <td>${(data.remark???string(data.remark?html,"未设置"))!'未设置'}</td>
                                <td align="center">
                                    <a onclick="showDialogAddPostPhone(this)" serializeNum="${serializeNum}"
                                       editUrl="${editUrl}" targetDataId="${data.memberPackageId}">延期</a>
                                </td>
                            </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
<script>
    $(".selectpicker").select2();
    function showDialogAddPostPhone(that) {
        var editUrl = $(that).attr("editUrl");
        tartgetdateId = $(that).attr("targetDataId");
        var serializeNum = $(that).attr("serializeNum");
        ajaxRequest(editUrl, {
            serializeNum: serializeNum,
            tartgetdateId: tartgetdateId,
            type:2
        }, function (html) {
            getTopWin().bootbox.dialog({
                message: html,
                title: "过渡延期",
                className: 'myDialog'
            });
        }, function () {
            ajaxError("加载页面失败!")
        }, "get", "html")
    }

</script>